<?php
    /**
     * Created by PhpStorm.
     * User: huangzhongwei
     * Date: 2018/10/29
     * Time: 16:31
     */

    namespace app\api\validate;


    class certification extends BaseValidate
    {

        protected $rule = [
            'realname'       => 'require|isNotEmpty',
            'sex'            => 'require|in:1,2',
            'department'     => 'require|isNotEmpty',
            'grade'          => 'require|isNotEmpty',
            'id_card_front'  => 'require|isNotEmpty',
            'id_card_back'   => 'require|isNotEmpty',
            'handheld_photo' => 'require|isNotEmpty',
        ];

        protected $message=[
            'realname'=>'真实姓名不能为空',
            'sex.require'=>"性别不能为空",
            'sex.in'=>"性别格式错误",
            'grade'=>'年级不能为空',
            'id_card_front'=>'身份证正面照片不能为空',
            'id_card_back'=>'身份证正面照片不能为空',
            'handheld_photo'=>'手持证件照不能为空'
        ];
    }